package cap5;

public class MaquinaExpendedora {
	//atributos de clase
	protected static final int maxCafe = 1500;
	protected static final int maxCacao = 600;
	//atributos de instancia
	protected int nroSerie;
	protected int cantCafe;
	protected int cantCacao; 
	protected MesAnio ultMnt;
	
	//Constructor
	public MaquinaExpendedora(int n) {
	//Cada depósito se carga completo
	  nroSerie = n;
	  ultMnt = new MesAnio(1,2010);
	  cantCafe = maxCafe;
	  cantCacao = maxCacao;}
	
	public void cafe() {
		  cantCafe = cantCafe - 40;}
	
		public int vasosCafe(){	
		  return (int) cantCafe/40;} 
	
	public MaquinaExpendedora masCafe (MaquinaExpendedora m) {
		 if (cantCafe > m.obtenerCantCafe())
		   return this;   	
		   else return m;}

	public int obtenerCantCafe() {
		// TODO Auto-generated method stub
		return 0;
	} 
	
	public boolean equals(MaquinaExpendedora e) {
		  boolean ig;
		  if (this == e)
		    ig = true;
		  else if (e == null)
			  ig = false;
		   else if(getClass()!= e.getClass())
		     ig = false;
		    else 
		      ig= nroSerie==(e.obtenerNroSerie()) &&
		          cantCafe==(e.obtenerCantCafe()) && 
		          cantCacao==(e.obtenerCantCacao());
		  return ig;}

	private int obtenerCantCacao() {
		// TODO Auto-generated method stub
		return 0;
	}

	public int obtenerNroSerie() {
		// TODO Auto-generated method stub
		return 0;
	}
}
